package com.grace.service.impl;

import com.grace.entity.Account;
import com.grace.mapper.AccountMapper;
import com.grace.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("AccountServiceImpl")
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountMapper accountMapper;

    @Override
    public List<Account> findAll() {
        System.out.println("业务层: 查询所有账户...");

        return accountMapper.findAll();
    }

    @Override
    public void saveAccount(Account account) {
        System.out.println("业务层: 保存账户信息...");
        accountMapper.saveAccount(account);
    }
}
